package com.YK.retryer.proxy;

import com.YK.retryer.lister.ResultLister;
import com.YK.retryer.strategy.annotationwrapper.intervalwrapper.AbstractTimeIntervalWrapper;
import com.YK.retryer.strategy.annotationwrapper.resultwrapper.AbstractResultListPredicateWrapper;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
import org.springframework.cglib.proxy.Callback;

import java.lang.reflect.Method;
import java.util.concurrent.ExecutorService;

/**
 * @author yuank
 * @version 1.0.0
 * @date 2025/2/28 16:20:12
 */
public class BeanMethodRetryProxy implements MethodInterceptor, Callback {

    private AbstractResultListPredicateWrapper normalResultPredicate;
    private AbstractResultListPredicateWrapper throwableResultPredicate;
    private AbstractTimeIntervalWrapper timeInterval;
    private ExecutorService threadPoolBean;
    private ResultLister listerBean;

    public BeanMethodRetryProxy(AbstractResultListPredicateWrapper normalResultPredicate,
                                AbstractResultListPredicateWrapper throwableResultPredicate,
                                AbstractTimeIntervalWrapper timeInterval,
                                ExecutorService threadPoolBean, ResultLister listerBean) {
        this.normalResultPredicate = normalResultPredicate;
        this.throwableResultPredicate = throwableResultPredicate;
        this.timeInterval = timeInterval;
        this.threadPoolBean = threadPoolBean;
        this.listerBean = listerBean;
    }

    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        return null;
    }


}